package com.tb.dubbo_service;

import com.tb.dubbo.IShopCarService;
import com.tb.mapper.ShopCarMapper;
import com.tb.pojo.ShopCar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service
public class ShopCarServiceImpl implements IShopCarService {

    @Autowired
    private ShopCarMapper shopCarMapper;

    @Override
    public int insert(ShopCar shopCar) {
        int flag = shopCarMapper.insert(shopCar);
        return flag;
    }

    @Override
    public ShopCar selectOneShopCar(ShopCar shopCar) {
        ShopCar car = shopCarMapper.selectOneShopCar(shopCar);
        return car;
    }

    @Override
    public int updateCarNum(ShopCar shopCar) {
        int flag = shopCarMapper.updateCarNum(shopCar);
        return flag;
    }

    @Override
    public int deleteShopCarByGoodsIdAndUserId(Map<String, Object> map) {
        int flag = shopCarMapper.deleteShopCarByGoodsIdAndUserId(map);
        return flag;
    }

    @Override
    public int deleteShopCars(Map<String, Object> map) {
        int flag = shopCarMapper.deleteShopCars(map);
        return flag;
    }
}
